﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <title>@ViewBag.Title</title>
    @{
        if (Session[AppConfig.SESSION_USER_NAME] == null)
        {
            Response.Redirect("/Login/login");
            return;
        }

    }
    @Styles.Render("~/bundles/bootstrapcss")
    @Styles.Render("~/bundles/adminltecss")

    <!--[if lt IE 9]>
    <script src="/Scripts/html5shiv/html5shiv.min.js"></script>
    <script src="/Scripts/respond.min.js"></script>
    <![endif]-->

    @RenderSection("styles", required: false)
</head>
<body class="hold-transition skin-blue sidebar-mini">
    <div class="wrapper">
        <header class="main-header">
            @Html.Partial("_header")
        </header>
        <aside class="main-sidebar">
            @Html.Partial("_sidebar")
        </aside>
        <div class="content-wrapper">
            <section class="content-header">
                <h1>
                    @ViewBag.pageHeader
                    <small>@ViewBag.pageDes</small>
                </h1>
                @*<ol class="breadcrumb">
                        <li><a href="#"><i class="fa fa-dashboard"></i> Level</a></li>
                        <li class="active">Here</li>
                    </ol>*@
            </section>
            <section class="content">
                @RenderBody()
            </section>
        </div>
        <footer class="main-footer">
            @Html.Partial("_footer")
        </footer>
        @*<aside class="control-sidebar control-sidebar-dark">
                @Html.Partial("_controlsidebar")
            </aside>*@
    </div>

    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/bootstrap")
    @Scripts.Render("~/bundles/adminlte")
    @Scripts.Render("~/bundles/bootstrap-notify")
    <script>
        $(function () {
            var url = window.location.pathname;
            var as = $(".mynav");
            for (var i = 0; i < as.length; i++) {
                var h = $(as[i]).attr("href");
                if (url.includes(h)) {
                    $(as[i]).parent().addClass("active");
                    $(as[i]).parent().parent().parent().addClass("active");
                }
            }
        })
    </script>
    @RenderSection("scripts", required: false)
</body>
</html>
